package gui.interfaces;

import model.data.FileDescription;

/**
 * <b>Project ChatSystemG6 INSA 4INFOA1 - 2013/2014</b>
 * <P>
 * <i>Package gui </i> <br>
 * Interface FromUser describes all the signals sent by the local user to the
 * chatSystem<br>
 * 
 * @author Christelle SIAGO HAPPI
 */
public interface FromUser {
	/**
	 * called when a local user want to connect to the chatSystem
	 */
	public void connect();

	/**
	 * called when he want to disconnect
	 */
	public void disconnect();

	/**
	 * indicates if a remote user is selected or not
	 * 
	 * @param isUserSelected
	 *            true if a remote user is selected and false otherwise
	 * @return
	 */

	public boolean selectUser(boolean isUserSelected);

	/**
	 * called when the local user want to start a new discussion
	 * 
	 * @param c
	 *            : the remote user
	 */
	public void openNewDiscussion(String c);

	/**
	 * submit the message to sent to the remote user
	 * 
	 * @param local
	 *            the login of the local user
	 * @param remote
	 *            : the login of the remote user
	 * @param text
	 *            : the text message to send
	 */

	public void sendMessage(String local, String remote, String text);

	/**
	 * submit the request to the remote user before sending a file
	 * 
	 * @param file
	 *            : the description of the file to send
	 * @param username
	 *            : the remote user to whom the local user want to send a file
	 */

	public void sendFileRequest(FileDescription file, String username);

	/**
	 * called when the local user want to close all the discussion tab
	 */

	public void closeAllDiscussion();
	
	/**
	 * send a wizz to a remote user
	 */
	
	public void sendWizz(String rUsername);
	
	/**
	 * is called when the user is typing a new message
	 * @param rUserName
	 * @param isWriting
	 */
	public void remoteIsWriting(String rUserName,boolean isWriting);

}
